﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="RSEstimateDataset" targetNamespace="http://tempuri.org/RSEstimateDataset.xsd" xmlns:mstns="http://tempuri.org/RSEstimateDataset.xsd" xmlns="http://tempuri.org/RSEstimateDataset.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="ReadyServiceConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Public" Name="ReadyServiceConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.ReadyServiceConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="vw_EstimateTableAdapter" GeneratorDataComponentClassName="vw_EstimateTableAdapter" Name="vw_Estimate" UserDataComponentName="vw_EstimateTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ReadyServiceConnectionString (Web.config)" DbObjectName="RSSBM.dbo.vw_Estimate" DbObjectType="View" GenerateMethods="Get" GenerateShortCommands="false" GeneratorGetMethodName="GetEstimateData" GetMethodModifier="Public" GetMethodName="GetEstimateData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetEstimateData" UserSourceName="GetEstimateData">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT e.CompanyId
      ,e.LocationId
      ,e.EstimateId
      ,e.DiscountAmount
      ,e.DiscountPercent
      ,e.AdditionalInstructions
      ,e.Terms
      ,e.LaborCost
      ,e.Description
      ,e.WorkOrderName
      ,e.EstimateStatusId
      ,e.PONumber
      ,e.TotalPartCost_CF
      ,e.TotalTaskCost_CF
      ,e.TotalCost_CF
      ,e.TotalEstimate_CF
      ,e.FirstName
      ,e.LastName
      ,e.Mobile
      ,e.Phone
      ,(SELECT e.FirstName + ' ' + e.LastName + '  ' + bl.street + ', ' + bl.city + ', ' + bl.state + ' ' + bl.zip FROM rs_tblLocation bl WHERE bl.locationid=e.BillingLocationId) AS BillTo
      ,(SELECT jl.street + ', ' + jl.city + ', ' + jl.state + ' ' + jl.zip FROM rs_tblLocation jl WHERE jl.locationid=e.LocationId) AS JobAddress
  FROM vw_Estimate e
 WHERE e.EstimateId=@EstimateId AND e.CompanyId=@CompanyId</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="EstimateId" ColumnName="EstimateId" DataSourceName="RSSBM.dbo.vw_Estimate" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@EstimateId" Precision="0" ProviderType="BigInt" Scale="0" Size="8" SourceColumn="EstimateId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="CompanyId" ColumnName="CompanyId" DataSourceName="RSSBM.dbo.vw_Estimate" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@CompanyId" Precision="0" ProviderType="BigInt" Scale="0" Size="8" SourceColumn="CompanyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="EstimateId" DataSetColumn="EstimateId" />
              <Mapping SourceColumn="LocationId" DataSetColumn="LocationId" />
              <Mapping SourceColumn="CompanyId" DataSetColumn="CompanyId" />
              <Mapping SourceColumn="FirstName" DataSetColumn="FirstName" />
              <Mapping SourceColumn="LastName" DataSetColumn="LastName" />
              <Mapping SourceColumn="Mobile" DataSetColumn="Mobile" />
              <Mapping SourceColumn="Phone" DataSetColumn="Phone" />
              <Mapping SourceColumn="BillTo" DataSetColumn="BillTo" />
              <Mapping SourceColumn="DiscountAmount" DataSetColumn="DiscountAmount" />
              <Mapping SourceColumn="DiscountPercent" DataSetColumn="DiscountPercent" />
              <Mapping SourceColumn="LaborCost" DataSetColumn="LaborCost" />
              <Mapping SourceColumn="TotalPartCost_CF" DataSetColumn="TotalPartCost_CF" />
              <Mapping SourceColumn="TotalTaskCost_CF" DataSetColumn="TotalTaskCost_CF" />
              <Mapping SourceColumn="TotalCost_CF" DataSetColumn="TotalCost_CF" />
              <Mapping SourceColumn="TotalEstimate_CF" DataSetColumn="TotalEstimate_CF" />
              <Mapping SourceColumn="EstimateStatusId" DataSetColumn="EstimateStatusId" />
              <Mapping SourceColumn="AdditionalInstructions" DataSetColumn="AdditionalInstructions" />
              <Mapping SourceColumn="Terms" DataSetColumn="Terms" />
              <Mapping SourceColumn="Description" DataSetColumn="Description" />
              <Mapping SourceColumn="WorkOrderName" DataSetColumn="WorkOrderName" />
              <Mapping SourceColumn="PONumber" DataSetColumn="PONumber" />
              <Mapping SourceColumn="JobAddress" DataSetColumn="JobAddress" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="rs_tblCompanyTableAdapter" GeneratorDataComponentClassName="rs_tblCompanyTableAdapter" Name="rs_tblCompany" UserDataComponentName="rs_tblCompanyTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ReadyServiceConnectionString (Web.config)" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="false" GeneratorGetMethodName="GetCompanyData" GetMethodModifier="Public" GetMethodName="GetCompanyData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetCompanyData" UserSourceName="GetCompanyData">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT [ID]
      ,[CompanyId]
      ,[CompanyName]
      ,[Street]
      ,[City]
      ,[State]
      ,[Zip]
      ,[Country]
      ,[CompanyName] + CHAR(13) + CHAR(10) + [Street] + CHAR(13) + CHAR(10) + [City] + ', ' + [State] + ' ' + [Zip] AS CompanyNameFullAddress
  FROM [dbo].[rs_tblCompany]
WHERE CompanyId=@CompanyId</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="CompanyId" ColumnName="CompanyId" DataSourceName="ReadyServiceCompany.dbo.rs_tblCompany" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@CompanyId" Precision="0" Scale="0" Size="8" SourceColumn="CompanyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ID" DataSetColumn="ID" />
              <Mapping SourceColumn="CompanyId" DataSetColumn="CompanyId" />
              <Mapping SourceColumn="CompanyName" DataSetColumn="CompanyName" />
              <Mapping SourceColumn="Street" DataSetColumn="Street" />
              <Mapping SourceColumn="City" DataSetColumn="City" />
              <Mapping SourceColumn="State" DataSetColumn="State" />
              <Mapping SourceColumn="Zip" DataSetColumn="Zip" />
              <Mapping SourceColumn="Country" DataSetColumn="Country" />
              <Mapping SourceColumn="CompanyNameFullAddress" DataSetColumn="CompanyNameFullAddress" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="vw_EstimateItemTableAdapter" GeneratorDataComponentClassName="vw_EstimateItemTableAdapter" Name="vw_EstimateItem" UserDataComponentName="vw_EstimateItemTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ReadyServiceConnectionString (Web.config)" DbObjectName="RSSBM.dbo.vw_EstimateItem" DbObjectType="View" GenerateMethods="Get" GenerateShortCommands="false" GeneratorGetMethodName="GetEstimateItemData" GetMethodModifier="Public" GetMethodName="GetEstimateItemData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetEstimateItemData" UserSourceName="GetEstimateItemData">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT estimateid
      ,companyid
      ,type
      ,quantity
      ,taskname
      ,rate
      ,laborcost
  FROM vw_EstimateItem
WHERE EstimateId=@estimateid AND CompanyId=@companyid
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="estimateid" ColumnName="estimateid" DataSourceName="RSSBM.dbo.vw_EstimateItem" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@estimateid" Precision="0" ProviderType="BigInt" Scale="0" Size="8" SourceColumn="estimateid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="companyid" ColumnName="companyid" DataSourceName="RSSBM.dbo.vw_EstimateItem" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@companyid" Precision="0" ProviderType="BigInt" Scale="0" Size="8" SourceColumn="companyid" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="estimateid" DataSetColumn="estimateid" />
              <Mapping SourceColumn="companyid" DataSetColumn="companyid" />
              <Mapping SourceColumn="type" DataSetColumn="type" />
              <Mapping SourceColumn="quantity" DataSetColumn="quantity" />
              <Mapping SourceColumn="taskname" DataSetColumn="taskname" />
              <Mapping SourceColumn="rate" DataSetColumn="rate" />
              <Mapping SourceColumn="laborcost" DataSetColumn="laborcost" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="RSEstimateDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="RSEstimateDataset" msprop:Generator_UserDSName="RSEstimateDataset">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="vw_Estimate" msprop:Generator_TableClassName="vw_EstimateDataTable" msprop:Generator_TableVarName="tablevw_Estimate" msprop:Generator_TablePropName="vw_Estimate" msprop:Generator_RowDeletingName="vw_EstimateRowDeleting" msprop:Generator_UserTableName="vw_Estimate" msprop:Generator_RowChangingName="vw_EstimateRowChanging" msprop:Generator_RowEvHandlerName="vw_EstimateRowChangeEventHandler" msprop:Generator_RowDeletedName="vw_EstimateRowDeleted" msprop:Generator_RowEvArgName="vw_EstimateRowChangeEvent" msprop:Generator_RowChangedName="vw_EstimateRowChanged" msprop:Generator_RowClassName="vw_EstimateRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="EstimateId" msprop:Generator_ColumnVarNameInTable="columnEstimateId" msprop:Generator_ColumnPropNameInRow="EstimateId" msprop:Generator_ColumnPropNameInTable="EstimateIdColumn" msprop:Generator_UserColumnName="EstimateId" type="xs:long" />
              <xs:element name="LocationId" msprop:Generator_ColumnVarNameInTable="columnLocationId" msprop:Generator_ColumnPropNameInRow="LocationId" msprop:Generator_ColumnPropNameInTable="LocationIdColumn" msprop:Generator_UserColumnName="LocationId" type="xs:long" minOccurs="0" />
              <xs:element name="CompanyId" msprop:Generator_ColumnVarNameInTable="columnCompanyId" msprop:Generator_ColumnPropNameInRow="CompanyId" msprop:Generator_ColumnPropNameInTable="CompanyIdColumn" msprop:Generator_UserColumnName="CompanyId" type="xs:long" minOccurs="0" />
              <xs:element name="FirstName" msprop:Generator_ColumnVarNameInTable="columnFirstName" msprop:Generator_ColumnPropNameInRow="FirstName" msprop:Generator_ColumnPropNameInTable="FirstNameColumn" msprop:Generator_UserColumnName="FirstName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="25" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LastName" msprop:Generator_ColumnVarNameInTable="columnLastName" msprop:Generator_ColumnPropNameInRow="LastName" msprop:Generator_ColumnPropNameInTable="LastNameColumn" msprop:Generator_UserColumnName="LastName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="25" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Mobile" msprop:Generator_ColumnVarNameInTable="columnMobile" msprop:Generator_ColumnPropNameInRow="Mobile" msprop:Generator_ColumnPropNameInTable="MobileColumn" msprop:Generator_UserColumnName="Mobile" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Phone" msprop:Generator_ColumnVarNameInTable="columnPhone" msprop:Generator_ColumnPropNameInRow="Phone" msprop:Generator_ColumnPropNameInTable="PhoneColumn" msprop:Generator_UserColumnName="Phone" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="BillTo" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnBillTo" msprop:Generator_ColumnPropNameInRow="BillTo" msprop:Generator_ColumnPropNameInTable="BillToColumn" msprop:Generator_UserColumnName="BillTo" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="273" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DiscountAmount" msprop:Generator_ColumnVarNameInTable="columnDiscountAmount" msprop:Generator_ColumnPropNameInRow="DiscountAmount" msprop:Generator_ColumnPropNameInTable="DiscountAmountColumn" msprop:Generator_UserColumnName="DiscountAmount" type="xs:decimal" minOccurs="0" />
              <xs:element name="DiscountPercent" msprop:Generator_ColumnVarNameInTable="columnDiscountPercent" msprop:Generator_ColumnPropNameInRow="DiscountPercent" msprop:Generator_ColumnPropNameInTable="DiscountPercentColumn" msprop:Generator_UserColumnName="DiscountPercent" type="xs:short" minOccurs="0" />
              <xs:element name="LaborCost" msprop:Generator_ColumnVarNameInTable="columnLaborCost" msprop:Generator_ColumnPropNameInRow="LaborCost" msprop:Generator_ColumnPropNameInTable="LaborCostColumn" msprop:Generator_UserColumnName="LaborCost" type="xs:decimal" minOccurs="0" />
              <xs:element name="TotalPartCost_CF" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTotalPartCost_CF" msprop:Generator_ColumnPropNameInRow="TotalPartCost_CF" msprop:Generator_ColumnPropNameInTable="TotalPartCost_CFColumn" msprop:Generator_UserColumnName="TotalPartCost_CF" type="xs:decimal" minOccurs="0" />
              <xs:element name="TotalTaskCost_CF" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTotalTaskCost_CF" msprop:Generator_ColumnPropNameInRow="TotalTaskCost_CF" msprop:Generator_ColumnPropNameInTable="TotalTaskCost_CFColumn" msprop:Generator_UserColumnName="TotalTaskCost_CF" type="xs:decimal" minOccurs="0" />
              <xs:element name="TotalCost_CF" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTotalCost_CF" msprop:Generator_ColumnPropNameInRow="TotalCost_CF" msprop:Generator_ColumnPropNameInTable="TotalCost_CFColumn" msprop:Generator_UserColumnName="TotalCost_CF" type="xs:decimal" minOccurs="0" />
              <xs:element name="TotalEstimate_CF" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTotalEstimate_CF" msprop:Generator_ColumnPropNameInRow="TotalEstimate_CF" msprop:Generator_ColumnPropNameInTable="TotalEstimate_CFColumn" msprop:Generator_UserColumnName="TotalEstimate_CF" type="xs:decimal" minOccurs="0" />
              <xs:element name="EstimateStatusId" msprop:Generator_ColumnVarNameInTable="columnEstimateStatusId" msprop:Generator_ColumnPropNameInRow="EstimateStatusId" msprop:Generator_ColumnPropNameInTable="EstimateStatusIdColumn" msprop:Generator_UserColumnName="EstimateStatusId" type="xs:int" minOccurs="0" />
              <xs:element name="AdditionalInstructions" msprop:Generator_ColumnVarNameInTable="columnAdditionalInstructions" msprop:Generator_ColumnPropNameInRow="AdditionalInstructions" msprop:Generator_ColumnPropNameInTable="AdditionalInstructionsColumn" msprop:Generator_UserColumnName="AdditionalInstructions" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Terms" msprop:Generator_ColumnVarNameInTable="columnTerms" msprop:Generator_ColumnPropNameInRow="Terms" msprop:Generator_ColumnPropNameInTable="TermsColumn" msprop:Generator_UserColumnName="Terms" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" msprop:Generator_UserColumnName="Description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="WorkOrderName" msprop:Generator_ColumnVarNameInTable="columnWorkOrderName" msprop:Generator_ColumnPropNameInRow="WorkOrderName" msprop:Generator_ColumnPropNameInTable="WorkOrderNameColumn" msprop:Generator_UserColumnName="WorkOrderName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="PONumber" msprop:Generator_ColumnVarNameInTable="columnPONumber" msprop:Generator_ColumnPropNameInRow="PONumber" msprop:Generator_ColumnPropNameInTable="PONumberColumn" msprop:Generator_UserColumnName="PONumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="JobAddress" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnJobAddress" msprop:Generator_ColumnPropNameInRow="JobAddress" msprop:Generator_ColumnPropNameInTable="JobAddressColumn" msprop:Generator_UserColumnName="JobAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="220" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="rs_tblCompany" msprop:Generator_TableClassName="rs_tblCompanyDataTable" msprop:Generator_TableVarName="tablers_tblCompany" msprop:Generator_TablePropName="rs_tblCompany" msprop:Generator_RowDeletingName="rs_tblCompanyRowDeleting" msprop:Generator_UserTableName="rs_tblCompany" msprop:Generator_RowChangingName="rs_tblCompanyRowChanging" msprop:Generator_RowEvHandlerName="rs_tblCompanyRowChangeEventHandler" msprop:Generator_RowDeletedName="rs_tblCompanyRowDeleted" msprop:Generator_RowEvArgName="rs_tblCompanyRowChangeEvent" msprop:Generator_RowChangedName="rs_tblCompanyRowChanged" msprop:Generator_RowClassName="rs_tblCompanyRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:long" />
              <xs:element name="CompanyId" msprop:Generator_ColumnVarNameInTable="columnCompanyId" msprop:Generator_ColumnPropNameInRow="CompanyId" msprop:Generator_ColumnPropNameInTable="CompanyIdColumn" msprop:Generator_UserColumnName="CompanyId" type="xs:long" minOccurs="0" />
              <xs:element name="CompanyName" msprop:Generator_ColumnVarNameInTable="columnCompanyName" msprop:Generator_ColumnPropNameInRow="CompanyName" msprop:Generator_ColumnPropNameInTable="CompanyNameColumn" msprop:Generator_UserColumnName="CompanyName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Street" msprop:Generator_ColumnVarNameInTable="columnStreet" msprop:Generator_ColumnPropNameInRow="Street" msprop:Generator_ColumnPropNameInTable="StreetColumn" msprop:Generator_UserColumnName="Street" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="City" msprop:Generator_ColumnVarNameInTable="columnCity" msprop:Generator_ColumnPropNameInRow="City" msprop:Generator_ColumnPropNameInTable="CityColumn" msprop:Generator_UserColumnName="City" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="State" msprop:Generator_ColumnVarNameInTable="columnState" msprop:Generator_ColumnPropNameInRow="State" msprop:Generator_ColumnPropNameInTable="StateColumn" msprop:Generator_UserColumnName="State" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="25" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Zip" msprop:Generator_ColumnVarNameInTable="columnZip" msprop:Generator_ColumnPropNameInRow="Zip" msprop:Generator_ColumnPropNameInTable="ZipColumn" msprop:Generator_UserColumnName="Zip" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Country" msprop:Generator_ColumnVarNameInTable="columnCountry" msprop:Generator_ColumnPropNameInRow="Country" msprop:Generator_ColumnPropNameInTable="CountryColumn" msprop:Generator_UserColumnName="Country" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="25" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CompanyNameFullAddress" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnCompanyNameFullAddress" msprop:Generator_ColumnPropNameInRow="CompanyNameFullAddress" msprop:Generator_ColumnPropNameInTable="CompanyNameFullAddressColumn" msprop:Generator_UserColumnName="CompanyNameFullAddress" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="297" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="vw_EstimateItem" msprop:Generator_TableClassName="vw_EstimateItemDataTable" msprop:Generator_TableVarName="tablevw_EstimateItem" msprop:Generator_TablePropName="vw_EstimateItem" msprop:Generator_RowDeletingName="vw_EstimateItemRowDeleting" msprop:Generator_UserTableName="vw_EstimateItem" msprop:Generator_RowChangingName="vw_EstimateItemRowChanging" msprop:Generator_RowEvHandlerName="vw_EstimateItemRowChangeEventHandler" msprop:Generator_RowDeletedName="vw_EstimateItemRowDeleted" msprop:Generator_RowEvArgName="vw_EstimateItemRowChangeEvent" msprop:Generator_RowChangedName="vw_EstimateItemRowChanged" msprop:Generator_RowClassName="vw_EstimateItemRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="estimateid" msprop:Generator_ColumnVarNameInTable="columnestimateid" msprop:Generator_ColumnPropNameInRow="estimateid" msprop:Generator_ColumnPropNameInTable="estimateidColumn" msprop:Generator_UserColumnName="estimateid" type="xs:long" />
              <xs:element name="companyid" msprop:Generator_ColumnVarNameInTable="columncompanyid" msprop:Generator_ColumnPropNameInRow="companyid" msprop:Generator_ColumnPropNameInTable="companyidColumn" msprop:Generator_UserColumnName="companyid" type="xs:long" minOccurs="0" />
              <xs:element name="type" msprop:Generator_ColumnVarNameInTable="columntype" msprop:Generator_ColumnPropNameInRow="type" msprop:Generator_ColumnPropNameInTable="typeColumn" msprop:Generator_UserColumnName="type">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="quantity" msprop:Generator_ColumnVarNameInTable="columnquantity" msprop:Generator_ColumnPropNameInRow="quantity" msprop:Generator_ColumnPropNameInTable="quantityColumn" msprop:Generator_UserColumnName="quantity" type="xs:int" minOccurs="0" />
              <xs:element name="taskname" msprop:Generator_ColumnVarNameInTable="columntaskname" msprop:Generator_ColumnPropNameInRow="taskname" msprop:Generator_ColumnPropNameInTable="tasknameColumn" msprop:Generator_UserColumnName="taskname" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="rate" msprop:Generator_ColumnVarNameInTable="columnrate" msprop:Generator_ColumnPropNameInRow="rate" msprop:Generator_ColumnPropNameInTable="rateColumn" msprop:Generator_UserColumnName="rate" type="xs:decimal" />
              <xs:element name="laborcost" msprop:Generator_ColumnVarNameInTable="columnlaborcost" msprop:Generator_ColumnPropNameInRow="laborcost" msprop:Generator_ColumnPropNameInTable="laborcostColumn" msprop:Generator_UserColumnName="laborcost" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:vw_Estimate" />
      <xs:field xpath="mstns:EstimateId" />
    </xs:unique>
    <xs:unique name="rs_tblCompany_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:rs_tblCompany" />
      <xs:field xpath="mstns:ID" />
    </xs:unique>
  </xs:element>
</xs:schema>